package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DOrderinformationMapper;
import com.ruoyi.system.domain.DOrderinformation;
import com.ruoyi.system.service.IDOrderinformationService;

/**
 * 订单信息Service业务层处理
 * 
 * @author tjm
 * @date 2025-04-16
 */
@Service
public class DOrderinformationServiceImpl implements IDOrderinformationService 
{
    @Autowired
    private DOrderinformationMapper dOrderinformationMapper;

    /**
     * 查询订单信息
     * 
     * @param oid 订单信息主键
     * @return 订单信息
     */
    @Override
    public DOrderinformation selectDOrderinformationByOid(Long oid)
    {
        return dOrderinformationMapper.selectDOrderinformationByOid(oid);
    }

    /**
     * 查询订单信息列表
     * 
     * @param dOrderinformation 订单信息
     * @return 订单信息
     */
    @Override
    public List<DOrderinformation> selectDOrderinformationList(DOrderinformation dOrderinformation)
    {
        return dOrderinformationMapper.selectDOrderinformationList(dOrderinformation);
    }

    /**
     * 新增订单信息
     * 
     * @param dOrderinformation 订单信息
     * @return 结果
     */
    @Override
    public int insertDOrderinformation(DOrderinformation dOrderinformation)
    {
        dOrderinformation.setCreateTime(DateUtils.getNowDate());
        return dOrderinformationMapper.insertDOrderinformation(dOrderinformation);
    }

    /**
     * 修改订单信息
     * 
     * @param dOrderinformation 订单信息
     * @return 结果
     */
    @Override
    public int updateDOrderinformation(DOrderinformation dOrderinformation)
    {
        return dOrderinformationMapper.updateDOrderinformation(dOrderinformation);
    }

    /**
     * 批量删除订单信息
     * 
     * @param oids 需要删除的订单信息主键
     * @return 结果
     */
    @Override
    public int deleteDOrderinformationByOids(Long[] oids)
    {
        return dOrderinformationMapper.deleteDOrderinformationByOids(oids);
    }

    /**
     * 删除订单信息信息
     * 
     * @param oid 订单信息主键
     * @return 结果
     */
    @Override
    public int deleteDOrderinformationByOid(Long oid)
    {
        return dOrderinformationMapper.deleteDOrderinformationByOid(oid);
    }
}
